package com.smart.campus.school.domain;

import java.util.Date;

import com.smart.campus.common.utils.DateUtils;
import com.smart.campus.school.enums.CheckInEnum;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.smart.campus.common.annotation.Excel;
import com.smart.campus.common.core.domain.BaseEntity;

/**
 * 有效打卡数据对象 sc_attendance_record_valid
 * 
 * @author Zhihe.Li
 * @date 2021-01-03
 */
public class AttendanceRecordValid extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** Id */
    private Long id;

    /** 打卡日期 */
    @Excel(name = "打卡日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date hpdate;

    /** 打卡日期yyyymmdd */
    private Long ymd;

    /** 出入状态，0:入，1:出 */
    @Excel(name = "出入状态，0:入，1:出")
    private Integer inOut;

    /** 卡号 */
    @Excel(name = "卡号")
    private String cardNo;

    /** 设备号1 */
    @Excel(name = "设备号1")
    private String deviceNo1;

    /** 设备号2 */
    @Excel(name = "设备号2")
    private String deviceNo2;

    /** 打卡时间2HHMM */
    @Excel(name = "打卡时间2HHMM")
    private Integer clockIn1;

    /** 打卡时间2HHMM */
    @Excel(name = "打卡时间2HHMM")
    private Integer clockIn2;

    /** 学校Id */
    private Long schoolId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setHpdate(Date hpdate) 
    {
        this.hpdate = hpdate;
        if(hpdate!=null){
            String l1 = DateUtils.parseDateToStr("yyyyMMdd",hpdate);
            this.ymd = Long.parseLong(l1);
        }
    }

    public Date getHpdate() 
    {
        return hpdate;
    }
    public void setYmd(Long ymd) 
    {
        this.ymd = ymd;
    }

    public Long getYmd() 
    {
        return ymd;
    }
    public void setInOut(Integer inOut)
    {
        this.inOut = inOut;
    }

    public Integer getInOut()
    {
        return inOut;
    }
    public void setCardNo(String cardNo) 
    {
        this.cardNo = cardNo;
    }

    public String getCardNo() 
    {
        return cardNo;
    }
    public void setDeviceNo1(String deviceNo1) 
    {
        this.deviceNo1 = deviceNo1;
    }

    public String getDeviceNo1() 
    {
        return deviceNo1;
    }
    public void setDeviceNo2(String deviceNo2) 
    {
        this.deviceNo2 = deviceNo2;
    }

    public String getDeviceNo2() 
    {
        return deviceNo2;
    }
    public void setClockIn1(Integer clockIn1) 
    {
        this.clockIn1 = clockIn1;
    }

    public Integer getClockIn1() 
    {
        return clockIn1;
    }
    public void setClockIn2(Integer clockIn2) 
    {
        this.clockIn2 = clockIn2;
    }

    public Integer getClockIn2() 
    {
        return clockIn2;
    }
    public void setSchoolId(Long schoolId) 
    {
        this.schoolId = schoolId;
    }

    public Long getSchoolId() 
    {
        return schoolId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("hpdate", getHpdate())
            .append("ymd", getYmd())
            .append("inOut", getInOut())
            .append("cardNo", getCardNo())
            .append("deviceNo1", getDeviceNo1())
            .append("deviceNo2", getDeviceNo2())
            .append("clockIn1", getClockIn1())
            .append("clockIn2", getClockIn2())
            .append("schoolId", getSchoolId())
            .toString();
    }
}
